package com.ruoyi.bnt.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.bnt.mapper.BntCourseissueMapper;
import com.ruoyi.bnt.domain.BntCourseissue;
import com.ruoyi.bnt.service.IBntCourseissueService;
import com.ruoyi.common.core.text.Convert;

/**
 * 课程期数（视频）Service业务层处理
 * 
 * @author yyj
 * @date 2020-10-03
 */
@Service
public class BntCourseissueServiceImpl implements IBntCourseissueService 
{
    @Autowired
    private BntCourseissueMapper bntCourseissueMapper;

    /**
     * 查询课程期数（视频）
     * 
     * @param id 课程期数（视频）ID
     * @return 课程期数（视频）
     */
    @Override
    public BntCourseissue selectBntCourseissueById(String id)
    {
        return bntCourseissueMapper.selectBntCourseissueById(id);
    }

    /**
     * 查询课程期数（视频）列表
     * 
     * @param bntCourseissue 课程期数（视频）
     * @return 课程期数（视频）
     */
    @Override
    public List<BntCourseissue> selectBntCourseissueList(BntCourseissue bntCourseissue)
    {
        return bntCourseissueMapper.selectBntCourseissueList(bntCourseissue);
    }

    /**
     * 新增课程期数（视频）
     * 
     * @param bntCourseissue 课程期数（视频）
     * @return 结果
     */
    @Override
    public int insertBntCourseissue(BntCourseissue bntCourseissue)
    {
        bntCourseissue.setCreateTime(DateUtils.getNowDate());
        return bntCourseissueMapper.insertBntCourseissue(bntCourseissue);
    }

    /**
     * 修改课程期数（视频）
     * 
     * @param bntCourseissue 课程期数（视频）
     * @return 结果
     */
    @Override
    public int updateBntCourseissue(BntCourseissue bntCourseissue)
    {
        bntCourseissue.setUpdateTime(DateUtils.getNowDate());
        return bntCourseissueMapper.updateBntCourseissue(bntCourseissue);
    }

    /**
     * 删除课程期数（视频）对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteBntCourseissueByIds(String ids)
    {
        return bntCourseissueMapper.deleteBntCourseissueByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除课程期数（视频）信息
     * 
     * @param id 课程期数（视频）ID
     * @return 结果
     */
    @Override
    public int deleteBntCourseissueById(String id)
    {
        return bntCourseissueMapper.deleteBntCourseissueById(id);
    }
}
